package com.ly.erms.common.constant.state;
/**
 * 菜单是否打开的状态
 * @author liuyang
 * @date 2017年12月29日
 */
public enum MenuOpenStatus {
	OPEN(1,"打开"),CLOSE(0,"关闭");
	
	int code ;
	String message;
	private MenuOpenStatus(int code ,String message) {
		this.code = code;
		this.message = message;
	}
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public static String valueOf(Integer code){
		if(code ==null){
			return "";
		}else{
			for(MenuOpenStatus menuOpenStatus:MenuOpenStatus.values()){
				if(menuOpenStatus.getCode() == code){
					return menuOpenStatus.getMessage();
				}
			}
			return "";
		}
	}
}
